package com.shangma.common.page;

import lombok.Data;

import java.util.List;

/**
 * @author: ShangMa
 * @className: PageBean
 * @description:
 * @date: 2023/4/17 10:25
 * @since: 11
 */
@Data
public class PageBean<T> {
    // 总数量
    private long total;
    // 分页数据
    private List<T> data;

    private PageBean(long total,List<T> data){
        this.total = total;
        this.data = data;
    }

    public static <T> PageBean<T> initData(long total,List<T> data){
        return new PageBean<T>(total,data);
    }

}
